package com.ilock.util;

import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;

public interface ICodeGenerator {
	
	/**
	 * get six bits numeric random code
	 * @return random code
	 */
	public String getRandomCode();
	
	
	/**
	 * encoding the string to get a access token
	 * @param str the string need to be encoding
	 * @return
	 * @throws NoSuchAlgorithmException
	 * @throws UnsupportedEncodingException
	 */
	public String MD5Encoding(String str)throws NoSuchAlgorithmException, UnsupportedEncodingException;

}
